<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>优购商城</title>
<!--载入css样式-->
<link rel="stylesheet" type="text/css" href="Public/Home/css/base.css"/>
<link rel="stylesheet" type="text/css" href="Public/Home/css/cart.css"/>
</head>
<body>
<!--载入头部公共模板-->
{{include file='VIEW_PATH/Common/header.php'}}

<!--购物车-->
<div id="cart">
	<div class="cart_header">
		<div class="logo fl">
			<a href="#"><img src="images/icon/logo-yg.png" alt="" /></a>
		</div>
		<div class="cart_step fr">
			<ul>
				<li class="current">
					我的购物车
					<em></em>
					<i></i>
				</li>
				<li>
					提交订单中心
					<em></em>
					<i></i>
				</li>
				<li>
					成功提交订单
					<em></em>
					<i></i>
				</li>
			</ul>
		</div>
	</div>
	<!--购物车列表-->
	<form action="{{U('Pay/index')}}" method="post">
		
	<div class="cart_list">
		{{if value="$allCartData"}}
		<table>
			<!--头部标题栏-->
			<tr>
				<th width="80" class="selecte_all">
					<input type="checkbox" checked="checked" class="check_all"/><span>全选</span>
				</th>
				<th width="100" >商品图片</th>
				<th width="400">商品名称</th>
				<th width="120">颜色尺码</th>
				<th width="120">单价</th>
				<th width="120">数量</th>
				<th width="120">小计(元)</th>
				<th width="130">操作</th>
			</tr>
			{{foreach from="$allCartData" key="$k" value="$v"}}
			<tr>
				<td>
					<!--隐藏域提供后面需要订单需要的信息-->
				<div class="check_the_hidden">
					<input type="hidden" name="goodsid[]" value="{{$v['id']}}" />
					<input type="hidden" name="goodsspec[{{$k}}][]" value="{{$v['options']['color']}}" />
					<input type="hidden" name="goodsspec[{{$k}}][]" value="{{$v['options']['size']}}" />
					<input type="hidden" name="value[]" value="{{$v['options']['size_value'].','.$v['options']['color_value']}}" />
					<input type="hidden" name="session_id[]"  value="{{$k}}" class="id"/>
				</div>
				<!--隐藏域结束-->
				</td>
				
				
				
				<td width="80" class="checkbox">
					<input type="checkbox" checked="checked" name="" class="check" />
				</td>
				<td width="100" class="goods_pic">
					<a target="_blank" href="{{U('Show/index',array('gid'=>$v['id']))}}">
						<img width="60" src="{{$v['options']['listpic']}}"/>
					</a>
				</td>
				<td width="328" class="goods_name">
					<a target="_blank" href="{{U('Show/index',array('gid'=>$v['id']))}}">{{$v['name']}}</a>
				</td>
				<td width="100" class="color_size">
					<div class="">
						<p>
							颜色：<span>{{$v['options']['color']}}</span>
						</p>
						<p>
							尺码：<strong>{{$v['options']['size']}}</strong>
						</p>
					</div>
					
				</td>
				<td width="120" class="goods_price">
					{{$v['price']}}
					<br />
					<span class="tip">
						限时抢
						<i></i>
					</span>
				</td>
				<td class="change_num" width="110">
					<a class="click jian" href="JavaScript:;"><i class="iconfont">&#xe622;</i></a>
					<em class="numdis">
						<input onbeforepaste="clipboardData.setData('text ',clipboardData.getData('text ').replace(/[^\d]/g, ' ')) " class="mycartxt newNum" type="text" value="{{$v['num']}}" name="goodsnum[]" >
					</em>
					<a class="click jia" href="JavaScript:;"><i class="iconfont">&#xe617;</i></a>
				</td>
				<td width="120" class="total">{{$v['total']}}</td>
				<td width="130" class="operate">
					<a href="#">移入收藏夹</a>
					<br />
					<a class="cart_del_inline" href="javascript:;">删除</a>
				</td>
			</tr>
			{{endforeach}}
		</table>
		{{else}}
			<h1 style="text-indent: 20px;">
				还没添加商品！快去<a style="color: red;" href="index.php">购物吧</a>！
			</h1>
		{{endif}}
	</div>
	<!--购物车操作-->
	<ul class="cart_operate">
		<li>
			<input type="checkbox" checked="checked" name="" id="" value="" />
			<span>全选</span>
		</li>
		<li>
			<a href="">移入收藏夹</a>
		</li>
		<script type="text/javascript">
			var cartDel = "{{U('Cart/del')}}";
			var cartUpdate = "{{U('Cart/upDate')}}";
		</script>
		<li>
			<a class="clean_all" href="{{U('Cart/delAll')}}">删除</a>
		</li>
	</ul>
</div>
	
<!--结算-->
<div id="account">
	<a class="continue_shop fl" href="{{U('Index/index')}}">继续购物</a>
	<div class="clean_cart fl">
		<a href="{{U('Cart/delAll')}}">清空购物车</a>
	</div>
	<div class="fr jieshuan">
		<strong>总计（不含运费）</strong>：
		<strong class="yuan">￥</strong>
		<strong class="money">{{Cart::getTotalPrice()}}</strong>
		<button type="submit">去结算</button>
	</div>
</div>

</form>
<!--购物保障-->	
<div id="security">
	<div class="fr">
		<p class="cart_bz">
			购物保障：
			<i class="iconfont">&#xe636;</i>
			100%正品
			<i class="iconfont">&#xe634;</i>
			10天退换货
			<i class="iconfont">&#xe635;</i>
			10天补差价
		</p>
		<p>优惠券/礼品卡在下一步使用</p>
		<p>
			<a href="">帮助我们改进购物流程</a>
		</p>
	</div>
</div>

<!--载入底部公共模板-->
{{include file='VIEW_PATH/Common/footer.php'}}
</body>
</html>
















